//
//  HZJSingerCollecViewCell.m
//  HZ_Beautiful_Music
//
//  Created by dllo on 16/4/6.
//  Copyright © 2016年 ui. All rights reserved.
//

#import "HZJSingerCollecViewCell.h"
#import "UIImageView+WebCache.h"
@interface HZJSingerCollecViewCell ()

@property (nonatomic, strong) UIImageView *image;

@property (nonatomic, strong) UILabel *title;

@end

@implementation HZJSingerCollecViewCell

-(instancetype)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        self.image = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height - 30)];
        [self.contentView addSubview:_image];
        
        self.title = [[UILabel alloc] initWithFrame:CGRectMake(5, self.bounds.size.height - 25, self.bounds.size.width - 10, 20)];
        [self.contentView addSubview:_title];
        
    }
    return self;
}

- (void)layoutSubviews {
    
    [super layoutSubviews];

}

- (void)setSingerModel:(HZJSingerModel *)singerModel {
    
    _singerModel = singerModel;
    
    [_image sd_setImageWithURL:[NSURL URLWithString:singerModel.pic_url]];
    _title.text = singerModel.title;
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
